package org.gdsdxy.pmmp.service;

import java.util.List;

import org.gdsdxy.pmmp.dao.IFriendDao;
import org.gdsdxy.pmmp.entity.Friend;

public class FriendServiceImpl implements IFriendService {
	private IFriendDao friendDao;

	public IFriendDao getFriendDao() {
		return friendDao;
	}

	public void setFriendDao(IFriendDao friendDao) {
		this.friendDao = friendDao;
	}

	@Override
	public void add(Friend f) {
		friendDao.save(f);
	}

	@Override
	public List<Friend> getFriendsById(int userId, String ensure) {
		// TODO Auto-generated method stub
		return friendDao.getFriendsById(userId, ensure);
	}

	@Override
	public void modify(Friend f) {
		// TODO Auto-generated method stub
		friendDao.udpate(f);
	}

	@Override
	public void remove(Friend f) {
		// TODO Auto-generated method stub
		friendDao.delete(f);
	}

	@Override
	public Friend get(Integer id) {
		// TODO Auto-generated method stub
		return friendDao.get(id);
	}

}
